package com.typhoon.jdbcTemplateHA.dao;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcOperations;
import org.springframework.stereotype.Repository;

import com.typhoon.jdbcTemplateHA.entity.User;

/**
 * 用户信息操作dao
 * 
 * @author Typhoon
 *
 */
@Repository("userDao")
public class UserDao {

	@Resource
	JdbcOperations crmBalanceJdbc;
	
	public List<User> selectAll() {
		String sql = "		select * from user	";
		return this.crmBalanceJdbc.query(sql, BeanPropertyRowMapper.newInstance(User.class));
	}
	
}
